import React from "react";
import styles from "./index.module.less";

const RankLi = (props) => {
    const { item, type } = props;

    return (
        <>
            <li className={styles.main_li}>
                <p className={styles.p1}>{item.sort}</p>
                <p className={styles.p2}>{item.nick}</p>
                <p className={styles.p3}>
                    {type === 1
                        ? item.totalAnswerNumbers
                        : type === 2
                        ? item.acceptionNumbers
                        : type === 3
                        ? item.gMoneyFromAnswers
                        : undefined}
                </p>
                <p className={styles.p4}>
                    {type === 1
                        ? item.acceptionNumbers
                        : type === 2
                        ? item.totalAnswerNumbers
                        : type === 3
                        ? item.acceptionNumbers
                        : undefined}
                </p>
                <p className={styles.p5}>
                    {type === 1
                        ? item.gMoneyFromAnswers
                        : type === 2
                        ? item.gMoneyFromAnswers
                        : type === 3
                        ? item.totalAnswerNumbers
                        : undefined}
                </p>
            </li>
        </>
    );
};

export default RankLi;
